package com.mazong.serverblog.service.impl;

import com.mazong.serverblog.mapper.IDbUserMapper;
import com.mazong.serverblog.pojo.TbUser;
import com.mazong.serverblog.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    IDbUserMapper iDbUserMapper;

    @Override
    public Object setUser(int id, String name, int age) {
        TbUser user = new TbUser();
        user.setId(id);
        user.setUserName(name);
        user.setAge(age);

        iDbUserMapper.updateUser(user);
        return user;
    }
}
